fix(session): separate sender from fee payer in settle and close#247
Open
brendanjryan wants to merge 1 commit intomainfrom
Open
fix(session): separate sender from fee payer in settle and close#247brendanjryan wants to merge 1 commit intomainfrom
brendanjryan wants to merge 1 commit intomainfrom
Conversation
commit: |
8d3fc58 to
7084015
Compare
7084015 to
da2264b
Compare
The escrow contract requires msg.sender == payee for settle() and close(). The sendFeePayerTx helper used the fee payer as both sender and gas sponsor, causing every fee-sponsored settlement/close to revert with NotPayee(). Fix sendFeePayerTx to accept a separate account (logical sender) and feePayer (gas sponsor). Update settleOnChain and closeOnChain to resolve and pass the correct account. Add account option to the top-level tempo.settle() API. Also fix feeToken resolution to use resolveCurrency() which falls back to pathUsd for unknown chain IDs (e.g. localnet).
da2264b to
aca8819
Compare
Collaborator
Author
|
@tmm examples are good here! |
tmm
approved these changes
Mar 27, 2026
Comment on lines
+733
to
+734
| // TODO: add on-chain test with distinct feePayer != account once localnet | ||
| // supports fee-sponsored settle (currently msg.sender resolves to feePayer). |
Comment on lines
+829
to
+830
| // TODO: add on-chain test with distinct feePayer != account once localnet | ||
| // supports fee-sponsored close (currently msg.sender resolves to feePayer). |
Comment on lines
103
to
+104
| feePayer?: Account | undefined, | ||
| account?: Account | undefined, |
Member
There was a problem hiding this comment.
Generic type parameter to require account if feePayer is defined?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The escrow contract requires
msg.sender == payeeforsettle()andclose(). ThesendFeePayerTxhelper used the fee payer as both sender and gas sponsor, causing every fee-sponsored settlement/close to revert withNotPayee().